package com.soft.base.protocol;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
/**
 * class
 *
 * @author user
 * @date 2020/06/05
 */
public class ResponseCodes {
    public static final int SUCCESS = 0;

    public static final int API_TOKEN_EMPTY = 1000;
    public static final int LOGIN_REQUIRED = 1001;
    public static final int CAPTCHA_ERROR = 1002;
    public static final int PERMIT_DENIED = 1003;
    public static final int USER_SESSION_OVERDUE = 1004;

    public static final int DEFAULT_ERROR = -1;

    public static final String QUERY_DIFFERENCE_WORKER_LIST_FAIL_CODE = "9300";
    public static final String QUERY_DIFFERENCE_ADMIN_LIST_FAIL_CODE = "9301";
    public static final String QUERY_MARKING_LIST_FAIL_CODE = "9400";
    public static final String QUERY_MARKING_DETAIL_FAIL_CODE = "9401";
    public static final String SUBMIT_MARKINGR_RESULT_FAILED = "9402";
    public static final String QUERY_MARKING_INVALID_PARAM = "9403";
    public static final String QUERY_PERSONNEL_GENERAL_SITUATION_FILE_CODE = "9500";
    public static final String QUERY_PERSONNEL_LINE_CHART_FILE_CODE = "9501";
    public static final String QUERY_PERSONNEL_ABILITY_FILE_CODE = "9502";
    public static final String QUERY_STATISTICS_OVERALL_GENERAL_SITUATION_FILE_CODE = "9600";
    public static final String QUERY_STATISTICS_OVERALL_DAILY_DETAIL_FILE_CODE = "9601";
    public static final String QUERY_STATISTICS_OVERALL_LINE_CHART_FILE_CODE = "9602";
    public static final String QUERY_ADMIN_INDEX_GENERAL_SITUATION_FILE_CODE = "9700";
    public static final String USER_GETDATA_FAILED = "10000";
    public static final String USER_NOT_ENTERED = "10001";
    public static final String USER_LOGIN_FAILED = "10002";
    public static final String PHONE_INVALID = "10003";
    public static final String USER_LOGINOUT_FALIED = "10004";
    public static final String USER_CHANGEPWD_FALIED = "10005";
    public static final String USERNAME_INVALID = "10006";
    public static final String USER_NOT_LOGIN = "10007";
    public static final String CREATE_ROLE_FAIL_CODE = "10010";
    public static final String DELETE_ROLE_FAIL_CODE = "10011";
    public static final String QUERY_ROLE_FAIL_CODE = "10012";
    public static final String QUERY_PERMISSION_FAIL_CODE = "10021";
    public static final String CREATE_LABEL_FAIL_CODE = "10030";
    public static final String DELETE_LABEL_FAIL_CODE = "10031";
    public static final String QUERY_LABEL_FAIL_CODE = "10032";
    public static final String USER_ENABLE_FILE_CODE = "10050";
    public static final String USER_DISABLE_FILE_CODE = "10051";
    public static final String USER_DELETE_FILE_CODE = "10052";
    public static final String USER_CREATE_OR_UPDATE_FILE_CODE = "10053";
    public static final String QUERY_USER_LIST_FILE_CODE = "10054";
    public static final String QUERY_SYS_LOG_FILE_CODE = "10060";
    public static final String QUERY_SYS_COMPANY_FILE_CODE = "10070";
    public static final String CREATE_TASK_FILE_CODE = "10080";

    public static final String UPLOAD_FILE_FAILURE = "100100";
    public static final String DATA_ALREADY_EXISTS = "100200";
    public static final String FILE_FORMAT_ERROR = "100101";
    public static final String PARAMS_VALIDATE_ERROR = "100300";
    public static final String DATA_DOES_NOT_EXIST = "100301";
    public static final String DATA_INCONSISTENT = "100302";
    public static final String RELATED_DATA_ERROR = "100400";
    public static final String INVALID_STATE = "100500";
    public static final String SYSTEM_ERROR = "500";

    public static final String FAILEDCOOKIE = "FAILEDCOOKIE";
    public static final Integer NO_AUTH = 40001;
    public static final Integer LOGINFAILEDCOUNT = 5;
    public static final String COUNT = "COUNT";
    public static final Integer DESC_LENGTH = 50;
    public static final Integer LABELNAME_LENGTH = 400;
    public static final Integer BATCH_COUNT = 500;
    public static final Integer LABELGROUPNAME_LENGTH = 40;
    public static final Long FILE_SIZE = 31457280L;

    public static Map<String, Object> dump() {
        HashMap<String, Object> map = new HashMap<>(1);
        try {
            for (Field field : ResponseCodes.class.getDeclaredFields()) {
                map.put(field.getName(), field.getInt(null));
            }
        } catch (IllegalAccessException e) {
        }
        return map;
    }
}
